package com.tongcao.cn.spi;

import java.util.ServiceLoader;

/**
 * @author:tongcao
 * @since:2019/6/20 11:31
 * Description:
 */
public class JavaSpi {

    public static void main(String[] args) {


        ServiceLoader<IShout> loader = ServiceLoader.load(IShout.class);
        System.out.println(loader);
        for (IShout shout : loader) {
            shout.shot();
        }

    }
}